import requests

from config import BASE_URL


class IHRMLoginAPI:
    @classmethod
    def login(cls, data):
        url = BASE_URL + '/api/sys/login'

        headers = {
            "Content-Type": "application/json"
        }

        r = requests.post(url, headers=headers, json=data)

        return r


if __name__ == '__main__':
    data = {
        "mobile": "13800000002",
        "password": "123456"
    }
    r = IHRMLoginAPI.login(data)
    print(r.status_code)
    print(r.json())
